package com.easyse.servicesystem.rest;

import com.easyse.serviceclient.clients.SystemClient;
import com.easyse.servicesystem.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: zky
 * @date: 2022/10/19
 * @description:
 */
@RestController
@RequestMapping("/system/permission")
public class permissionResource implements SystemClient {

    @Autowired
    MenuService menuService;

    @GetMapping("/{id}")
    public List<String> selectPermsByUserId(@PathVariable("id")Long id) {
        return menuService.selectPermsByUserId(id);
    }

}
